// 组件允许单个组件打包，因此默认引入公共基础样式

@import "../../base.less";

@import "./_var.less";

@import "./_mixin.less";

.@{prefix}-steps {
  display: flex;
  width: 100%;
  .step-item-basic();

  // 水平步骤条
  &--horizontal {

    // 默认锚点
    &.@{prefix}-steps--default-anchor {

      .@{prefix}-steps-item-content {
        margin-top: @steps-item-content-margin-top;
      }

      .@{prefix}-steps-item-title {
        width: fit-content;
        margin-bottom: @steps-item-title-margin-bottom;
      }

      .@{prefix}-steps-item-icon {
        &__number {
          width: steps-circle-width;
          height: @steps-circle-height;
          margin-top: @steps-item-icon-number-margin-top;
        }

        & > .t-icon {
          font-size: @steps-item-t-icon-font-size;
        }
      }

      // 默认锚点的连接线，以 title 为起点
      .connector-default(horizontal);
    }

    // 点状锚点
    &.@{prefix}-steps--dot-anchor {

      .@{prefix}-steps-item {
        overflow: visible;

        .@{prefix}-steps-item-title {
          padding-right: 0;
          margin-bottom: @steps-item-title-margin-bottom;
        }

        &--finish {
          .dot-anchor-status(finish);
        }

        &--process {
          .dot-anchor-status(process);
        }

        &--error {
          .dot-anchor-status(error);
        }
      }

      .@{prefix}-steps-item__inner {
        display: flex;
        flex-direction: column;
        align-items: @steps-item-inner-align-items;
      }

      .dot-icon(horizontal);
      // 点状锚点连接线，以整个 item 为起点
      .connector-dot(horizontal);
    }
  }

  // 垂直步骤条
  &--vertical {
    flex-direction: column;

    // 默认步骤条连接线，以 item 为起点
    &.@{prefix}-steps--positive {
      .connector-default(vertical);
    }

    // 默认锚点
    &.@{prefix}-steps--default-anchor {

      .@{prefix}-steps-item-content {
        margin-top: @steps-item-content-margin-top-vertical;
        margin-left: @steps-item-content-margin-left-vertical;
      }

      .@{prefix}-steps-item-title {
        margin-bottom: @steps-item-title-margin-bottom;
      }
    }

    // 点状锚点
    &.@{prefix}-steps--dot-anchor {

      // 点状步骤条连接线，以 item 为起点
      &.@{prefix}-steps--positive {
        .connector-dot(vertical);
      }

      .@{prefix}-steps-item {
        margin-bottom: 0;

        &--finish {
          .dot-anchor-status(finish);
        }

        &--process {
          .dot-anchor-status(process);
        }

        &--error {
          .dot-anchor-status(error);
        }
      }

      .dot-icon(vertical);
    }

    // 倒序
    &.@{prefix}-steps--reverse {
      flex-direction: column-reverse;
      .connector-default(vertical, true);

      &.@{prefix}-steps--dot-anchor {
        .connector-dot(vertical, true);
      }
    }
  }
}
